<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<?php  $sql="select * from food"; 
$row = mysql_query($sql);
 ?> 
<form action="admin.php?c=video&m=add" method="post" enctype="multipart/form-data">
<table>
<caption>添加菜谱</caption>
<tr>
  <td>菜谱名称：</td>
  <td><input type="text" name="name"  id="name" size=30  >
  </td>
</tr>

<tr>
  <td>菜谱类型：</td>
  <td><select name="tid" class="form-control">
                <option value="0">请选择</option>
                foreach($row as $one){
                  echo '<option value="'.$one['tid'].'">'.$one['typename'].'</option>';
                  }   
        <option value="1">川菜</option>
        <option value="2">粤菜</option>
        <option value="3">湘菜</option>
        <option value="4">鲁菜</option>
        <option value="5">东北菜</option>
      </select>
               
</tr>

<tr>
  <td>菜谱图片:</td>
  <td><input type="file" name="pic" size=30  id="pic" ></td>
</tr>

<tr>
  <td>用料:</td>
  <td><input type="text" name="yl" size=30  id="yl" ></td>
</tr>

<tr>
  <td>点击率:</td>
  <td><input type="date" name="hittimes" size=30 id="hittimes"></td>
</tr>

<tr>
  <td>做法:</td>
  <td><input type="text" name="zf" size=30  id="zf"></td>
</tr>

<tr >
	<td colspan="2" align="center">
		<input type="submit"  value="提交"></input>
		<input type="reset" value="重置"></input>
	</td>
</tr>
</table>
</body>
</html>